<?php
if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])){
	header($_SERVER['HTTP_HOST']);
	exit();
}
?>

<div id="px_message" class="updated" style="display:none"><p></p></div>
<form action="admin.php?page=px_manage&action=edit_styles&amp;do=editStyles&amp;gid=<?php echo $px_model->cur_gallery_id;?>" method="post">
    <div class="wrap" id="finGallery">
        <a name="topGal" id="topGal"></a>
        <h2><?php _e('PhotoXhibit Style Editor', 'photoxhibit'); ?></h2>
    
        <table cellpadding="3" cellspacing="0" border="0" style="padding-bottom:2em;">
        <tr>
            <td>
                <a href="admin.php?page=px_manage&amp;action=edit_styles&amp;pxgid=<?php echo $px_model->cur_gallery_id;?>"
                    ><?php _e('Edit Styles', 'photoxhibit'); ?></a></td>
            <td><a href="admin.php?page=px_build&amp;pxgid=<?php echo $px_model->cur_gallery_id;?>" class=""
                    ><?php _e('Edit Gallery', 'photoxhibit'); ?></a></td>
        </tr>
    </table>
        <div style="margin: auto; width: 650px; " id="parent">
            <?php $this->get_css( true );?>
            <?php $this->get_js( true );?>
            <?php $this->build_img_structure();?>
        </div>
    </div>
    <script type="text/javascript" src="<?php echo $this->parentFileUrl.'?option=edit_styles&'.time();?>"></script>
    
    <div class="wrap">
        <p class="submit">
            <input type="hidden" name="pxgid" id="pxgid" value="<?php echo $px_model->cur_gallery_id;?>"/>
        <?php if( $this->vars['none_ajax_styles'] == 1 ):?>
            <input type="submit" name="px_processStyles" id="px_processStyles" value="<?php _e('Process Styles', 'photoxhibit'); ?>" />
        <?php else: ?>
            <input type="submit" name="px_processStylesNoneAjax" id="px_processStylesNoneAjax" value="<?php _e('Process Styles', 'photoxhibit'); ?>" />
        <?php endif;?>
        </p>
        <textarea style="width:97%;height:300px;" id="px_stylesTextarea" name="px_stylesTextarea"><?php echo $$px_model->cur_gallery_info->gallery_css;?></textarea>
    </div>
</form>